package com.ruoyi.depot.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 收货单对象 tb_receipt
 *
 * @author ruoyi
 * @date 2023-12-26
 */
@TableName("tb_receipt")  // 指定数据库表名
public class Receipt extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 收货单id
	 */
	@TableId(value = "receipt_id")  // 指定主键字段
	private String receiptId;

	/**
	 * 收货编号
	 */
	@TableField("receipt_number")  // 指定数据库字段
	@Excel(name = "收货编号")
	private String receiptNumber;

	/**
	 * 关联采购订单表
	 */
	@TableField("orders_id")
	@Excel(name = "关联采购订单表(tb_procured_orders)")
	private Long ordersId;

	/**
	 * 通知收货量
	 */
	@TableField("notice_receipt_quantity")
	@Excel(name = "通知收货量")
	private Long noticeReceiptQuantity;

	@TableField(exist = false)
	private Long notificationQuantity;

	/**
	 * 收货量
	 */
	@TableField("receipt_quantity")
	@Excel(name = "收货量")
	private Long receiptQuantity;

	/**
	 * 收货人
	 */
	@TableField("consignee")
	@Excel(name = "收货人")
	private String consignee;

	/**
	 * 收货时间
	 */
	@TableField("receipt_time")
	@JsonFormat(pattern = "yyyy-MM-dd")
	@Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd")
	private Date receiptTime;

	/**
	 * 收货状态
	 */
	@TableField("receipt_status")
	@Excel(name = "收货状态")
	private String receiptStatus;

	/**
	 * 备注
	 */
	@TableField("receipt_remark")
	@Excel(name = "备注")
	private String receiptRemark;

	/**
	 * 删除状态 0存在1删除
	 */
	@TableLogic  // MyBatis-Plus 逻辑删除注解
	@TableField("delete_status")
	private String deleteStatus;


	/**
	 * 运费
	 */
	@TableField("freight")
	private BigDecimal freight;

	/**
	 * 仓库id
	 */
	@TableField("warehouse_id")
	private Long warehouseId;

	/**
	 * 供应商id
	 */
	@TableField(exist = false)
	private Long vendorId;

	/**
	 * 供应商名称
	 */
	@TableField(exist = false)  // 非数据库字段
	private String name;

	/**
	 * 采购人员
	 */
	@TableField(exist = false)
	private String userName;

	/**
	 * 仓库
	 */
	@TableField(exist = false)
	private String warehouseName;

	/**
	 * 采购单号
	 */
	@TableField(exist = false)
	private String ordersNumber;

	/**
	 * 收货单信息
	 */
	@TableField(exist = false)
	@JsonProperty("DTOReceiptProductsList")
	private List<DTOReceiptProducts> dtoReceiptProductsList;


	/**
	 * 选择的查询类型
	 */
	@TableField(exist = false)
	private String select;

	/**
	 * 查询关键字
	 */
	@TableField(exist = false)
	private String unknown;

	/**
	 * 自定义收货明细
	 */
	@TableField(exist = false)
	private List<Map> receiptProductsListMap;

	/**
	 * 起始时间
	 */
	@TableField(exist = false)
	private Date startTime;

	/**
	 * 结束时间
	 */
	@TableField(exist = false)
	private Date endTime;

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}


	public String getWarehouseName() {
		return warehouseName;
	}


	public String getUnknown() {
		return unknown;
	}

	public Long getVendorId() {
		return vendorId;
	}

	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	public void setUnknown(String unknown) {
		this.unknown = unknown;
	}

	public String getSelect() {
		return select;
	}

	public void setSelect(String select) {
		this.select = select != null ? select.trim() : null;
	}

	public void setWarehouseName(String warehouseName) {
		this.warehouseName = warehouseName;
	}

	public String getOrdersNumber() {
		return ordersNumber;
	}

	public void setOrdersNumber(String ordersNumber) {
		this.ordersNumber = ordersNumber;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Long getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(Long warehouseId) {
		this.warehouseId = warehouseId;
	}

	public BigDecimal getFreight() {
		return freight;
	}

	public void setFreight(BigDecimal freight) {
		this.freight = freight;
	}

	public Long getNotificationQuantity() {
		return notificationQuantity;
	}

	public void setNotificationQuantity(Long notificationQuantity) {
		this.notificationQuantity = notificationQuantity;
	}

	public String getReceiptId() {
		return receiptId;
	}

	public void setReceiptId(String receiptId) {
		this.receiptId = receiptId;
	}

	public void setReceiptNumber(String receiptNumber) {
		this.receiptNumber = receiptNumber;
	}

	public String getReceiptNumber() {
		return receiptNumber;
	}

	public void setOrdersId(Long ordersId) {
		this.ordersId = ordersId;
	}

	public Long getOrdersId() {
		return ordersId;
	}

	public void setNoticeReceiptQuantity(Long noticeReceiptQuantity) {
		this.noticeReceiptQuantity = noticeReceiptQuantity;
	}

	public Long getNoticeReceiptQuantity() {
		return noticeReceiptQuantity;
	}

	public void setReceiptQuantity(Long receiptQuantity) {
		this.receiptQuantity = receiptQuantity;
	}

	public Long getReceiptQuantity() {
		return receiptQuantity;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}

	public String getConsignee() {
		return consignee;
	}

	public void setReceiptTime(Date receiptTime) {
		this.receiptTime = receiptTime;
	}

	public Date getReceiptTime() {
		return receiptTime;
	}

	public void setReceiptStatus(String receiptStatus) {
		this.receiptStatus = receiptStatus;
	}

	public String getReceiptStatus() {
		return receiptStatus;
	}

	public void setReceiptRemark(String receiptRemark) {
		this.receiptRemark = receiptRemark;
	}

	public String getReceiptRemark() {
		return receiptRemark;
	}

	public void setDeleteStatus(String deleteStatus) {
		this.deleteStatus = deleteStatus;
	}

	public String getDeleteStatus() {
		return deleteStatus;
	}


	public List<DTOReceiptProducts> getDtoReceiptProductsList() {
		return dtoReceiptProductsList;
	}

	public void setDtoReceiptProductsList(List<DTOReceiptProducts> dtoReceiptProductsList) {
		this.dtoReceiptProductsList = dtoReceiptProductsList;
	}

	public List<Map> getReceiptProductsListMap() {
		return receiptProductsListMap;
	}

	public void setReceiptProductsListMap(List<Map> receiptProductsListMap) {
		this.receiptProductsListMap = receiptProductsListMap;
	}

	@Override
	public String toString() {
		return "Receipt{" +
				"receiptId=" + receiptId +
				", receiptNumber='" + receiptNumber + '\'' +
				", ordersId=" + ordersId +
				", noticeReceiptQuantity=" + noticeReceiptQuantity +
				", notificationQuantity=" + notificationQuantity +
				", receiptQuantity=" + receiptQuantity +
				", consignee='" + consignee + '\'' +
				", receiptTime=" + receiptTime +
				", receiptStatus='" + receiptStatus + '\'' +
				", receiptRemark='" + receiptRemark + '\'' +
				", deleteStatus='" + deleteStatus + '\'' +
				", freight=" + freight +
				", warehouseId=" + warehouseId +
				", name='" + name + '\'' +
				", userName='" + userName + '\'' +
				", warehouseName='" + warehouseName + '\'' +
				", ordersNumber='" + ordersNumber + '\'' +
				", dtoReceiptProductsList=" + dtoReceiptProductsList +
				", receiptProductsListMap=" + receiptProductsListMap +
				'}';
	}
}
